#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<string>
#include<vector>
using namespace std;

int main()
{
	string ch;
	cin >> ch;
	int size = 0;
	for (int i = 0; i < ch.size(); i++)
	{
		if (ch[i] == '1')
			size++;
	}
	cout << size;
}